package com.tqjc.system.common.enums;

import com.tqjc.system.common.constant.AddTaskConstant;
import com.tqjc.system.common.constant.GlobalConstant;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 86195
 * @version 1.0
 * @description 跨区枚举
 * @date 2023/12/2 10:56
 */
@NoArgsConstructor
@AllArgsConstructor
@Getter
public enum SpanEnum {

    DREGS_STEEL_SPAN(AddTaskConstant.DREGS_STEEL_SPAN_NO,"渣跨",new HashMap<String,String>(3){{
        put("1","28292");
        put("2","28292");
        put("3","28292");
    }}),

    WASTE_STEEL_SPAN(AddTaskConstant.WASTE_STEEL_SPAN_NO,"废钢跨",new HashMap<String,String>(3){{
        put("1","6000");
        put("2","6000");
        put("3","8000");
    }});
    //28292




    /**
     * 跨区编码
     */
    private String spanNo;

    /**
     * 跨区描述
     */
    private String desc;

    /**
     * 槽车当前跨坐标信息
     */
    private Map<String,String> tankCarIndex;



    public static SpanEnum getSpanEnum(String spanNo){
        for (SpanEnum value : SpanEnum.values()) {

            if(value.getSpanNo().equals(spanNo)){
                return value;
            }
        }
        return null;
    }




}
